//
// FILE	
// 				fum_comm.h
// AUTHOR
//				Filipe Teixeira Campos
// PROPERTY
//				This code is property of Filipe Teixeira Campos.
//				This code has no warranty, use at Your own risk.
//				The intelectual property is of of Filipe Teixeira Campos.
//
// DESC		 
//				this is the comm driver includes
//

#include <avr/io.h>
#include <avr/delay.h>
#include <avr/interrupt.h>
#include <avr/signal.h>

//
// defines
// 

#define FUM_TXBUFFER				35					// size of tx buffer
#define FUM_RXBUFFER				5					// size of rx buffer
#define FUMFUNC						__attribute__ ((naked))

//
// structs
//
typedef struct 
{
	unsigned char     ucTxComplete;						// at 1 when tx is complete
	unsigned char 		ucTxBytes;							// pointer to transmitt buffer
	unsigned char 		ucRxBytes;							// if >0 has receive bytes
	char 				TxBuffer[FUM_TXBUFFER];				// transmit buffer
	char 				RxBuffer[FUM_RXBUFFER];				// transmit buffer
} FUM_SERIALCOM;

//
// vars
//
FUM_SERIALCOM fu_serial;

//
// prototypes
//

void InitComm(void);
void TxDataCom(void);
char PeekChar(void);
